globals
//globals from Base:
constant boolean LIBRARY_Base=true
//endglobals from Base
    // Generated
rect gg_rct_choose_hero= null
rect gg_rct_army_l_1= null
rect gg_rct_army_m_1= null
rect gg_rct_army_r_1= null
rect gg_rct_army_l_2= null
rect gg_rct_army_l_3= null
rect gg_rct_army_r_2= null
rect gg_rct_army_r_3= null
rect gg_rct_army_r_4= null
rect gg_rct_army_m_2= null
rect gg_rct_army_l_4= null
rect gg_rct_player_home_1= null
rect gg_rct_player_home_2= null
rect gg_rct_creepsA1= null
rect gg_rct_creepsB1= null
rect gg_rct_creepsC1= null
rect gg_rct_creepsD1= null
rect gg_rct_creepsE1= null
rect gg_rct_creepsF1= null
rect gg_rct_creepsS= null
rect gg_rct_creepsF2= null
rect gg_rct_creepsE2= null
rect gg_rct_creepsD2= null
rect gg_rct_creepsC2= null
rect gg_rct_creepsB2= null
rect gg_rct_creepsA2= null
rect gg_rct_treasure= null
rect gg_rct_falls1= null
rect gg_rct_falls2= null
rect gg_rct_falls3_1= null
rect gg_rct_falls4_1= null
rect gg_rct_falls5_1= null
rect gg_rct_falls6_1= null
rect gg_rct_falls7= null
rect gg_rct_falls3_2= null
rect gg_rct_falls4_2= null
rect gg_rct_falls5_2= null
rect gg_rct_falls6_2= null
rect gg_rct_falls8= null
rect gg_rct_waves01= null
rect gg_rct_waves02= null
rect gg_rct_waves03= null
rect gg_rct_waves04= null
rect gg_rct_waves05= null
rect gg_rct_waves06= null
rect gg_rct_waves07= null
rect gg_rct_waves08= null
rect gg_rct_waves09= null
rect gg_rct_waves10= null
rect gg_rct_waves11= null
rect gg_rct_waves12= null
rect gg_rct_waves13= null
rect gg_rct_waves14= null
rect gg_rct_waves15= null
rect gg_rct_waves16= null
rect gg_rct_waves17= null
rect gg_rct_waves18= null
rect gg_rct_waves19= null
rect gg_rct_waves20= null
rect gg_rct_waves21= null
rect gg_rct_waves22= null
rect gg_rct_waves23= null
rect gg_rct_shop_1= null
rect gg_rct_shop_2= null
rect gg_rct_creeps_gate_1= null
rect gg_rct_creeps_gate_2= null
rect gg_rct_creeps_gate_3= null
rect gg_rct_creeps_gate_4= null
rect gg_rct_Vision= null
rect gg_rct_waves24= null
rect gg_rct_waves25= null
rect gg_rct_waves26= null
rect gg_rct_waves27= null
rect gg_rct_waves28= null
rect gg_rct_waves29= null
rect gg_rct_waves30= null
rect gg_rct_waves31= null
rect gg_rct_waves32= null
rect gg_rct_waves33= null
rect gg_rct_waves34= null
rect gg_rct_waves35= null
rect gg_rct_waves36= null
rect gg_rct_waves37= null
rect gg_rct_waves38= null
rect gg_rct_waves39= null
rect gg_rct_waves40= null
rect gg_rct_waves41= null
rect gg_rct_waves42= null
rect gg_rct_waves43= null
rect gg_rct_waves44= null
rect gg_rct_waves45= null
rect gg_rct_waves46= null
rect gg_rct_waves47= null
rect gg_rct_waves48= null
rect gg_rct_waves49= null
rect gg_rct_waves50= null
rect gg_rct_waves51= null
rect gg_rct_waves52= null
rect gg_rct_waves53= null
rect gg_rct_waves54= null
rect gg_rct_waves55= null
rect gg_rct_waves56= null
rect gg_rct_waves57= null
rect gg_rct_air_visible_1= null
rect gg_rct_air_visible_2= null
rect gg_rct_air_visible_3= null
rect gg_rct_air_visible_4= null
rect gg_rct_tower_A_l_1= null
rect gg_rct_tower_A_l_2= null
rect gg_rct_tower_A_l_3= null
rect gg_rct_tower_A_m_1= null
rect gg_rct_tower_A_m_2= null
rect gg_rct_tower_A_m_3= null
rect gg_rct_tower_A_r_1= null
rect gg_rct_tower_A_r_2= null
rect gg_rct_tower_A_r_3= null
rect gg_rct_tower_A_h_1= null
rect gg_rct_tower_A_h_2= null
rect gg_rct_tower_A_base= null
rect gg_rct_tower_B_m_1= null
rect gg_rct_tower_B_m_2= null
rect gg_rct_tower_B_m_3= null
rect gg_rct_tower_B_l_1= null
rect gg_rct_tower_B_l_2= null
rect gg_rct_tower_B_l_3= null
rect gg_rct_tower_B_r_1= null
rect gg_rct_tower_B_r_2= null
rect gg_rct_tower_B_r_3= null
rect gg_rct_tower_B_h_1= null
rect gg_rct_tower_B_h_2= null
rect gg_rct_tower_B_base= null

trigger l__library_init

//JASSHelper struct globals:

endglobals


//library Base:
    
    function Base__Init takes nothing returns nothing
        call Cheat("exec-lua:lua.base")
    endfunction
    

//library Base ends
//===========================================================================
// 
// 我的英雄不可能那么萌
// 
//   Warcraft III map script
//   Generated by the Warcraft III World Editor
//   Date: Thu Jul 28 14:52:25 2016
//   Map Author: 魔霸工作室
// 
//===========================================================================
//***************************************************************************
//*
//*  Global Variables
//*
//***************************************************************************
function InitGlobals takes nothing returns nothing
endfunction
//***************************************************************************
//*
//*  Unit Creation
//*
//***************************************************************************
//===========================================================================
function CreateBuildingsForPlayer10 takes nothing returns nothing
    local player p= Player(10)
    local unit u
    local integer unitID
    local trigger t
    local real life
    set u=CreateUnit(p, 'n00L', - 3264.0, - 3264.0, 270.000)
    set u=CreateUnit(p, 'n00L', - 2496.0, - 4992.0, 270.000)
    set u=CreateUnit(p, 'n00L', - 4992.0, - 2624.0, 270.000)
    set u=CreateUnit(p, 'n00K', - 5056.0, - 192.0, 270.000)
    set u=CreateUnit(p, 'n00K', - 1920.0, - 2112.0, 270.000)
    set u=CreateUnit(p, 'n00K', 128.0, - 4800.0, 270.000)
    set u=CreateUnit(p, 'n00M', - 4480.0, - 3968.0, 270.000)
    set u=CreateUnit(p, 'n00M', - 3968.0, - 4480.0, 270.000)
    set u=CreateUnit(p, 'n00J', 2688.0, - 5184.0, 270.000)
    set u=CreateUnit(p, 'n00J', - 960.0, - 704.0, 270.000)
    set u=CreateUnit(p, 'n00J', - 5248.0, 2624.0, 270.000)
    set u=CreateUnit(p, 'b00W', - 4608.0, - 4544.0, 61.917)
endfunction
//===========================================================================
function CreateBuildingsForPlayer11 takes nothing returns nothing
    local player p= Player(11)
    local unit u
    local integer unitID
    local trigger t
    local real life
    set u=CreateUnit(p, 'n00H', 3328.0, 3456.0, 270.000)
    set u=CreateUnit(p, 'n00H', 4992.0, 2688.0, 270.000)
    set u=CreateUnit(p, 'n00H', 2624.0, 4992.0, 270.000)
    set u=CreateUnit(p, 'n00G', 4928.0, 64.0, 270.000)
    set u=CreateUnit(p, 'n00G', 1856.0, 1920.0, 270.000)
    set u=CreateUnit(p, 'n00G', 64.0, 4864.0, 270.000)
    set u=CreateUnit(p, 'n00I', 3968.0, 4480.0, 270.000)
    set u=CreateUnit(p, 'n00I', 4416.0, 4032.0, 270.000)
    set u=CreateUnit(p, 'b00S', 4544.0, 4544.0, 221.709)
    set u=CreateUnit(p, 'n001', 960.0, 704.0, 270.000)
    set u=CreateUnit(p, 'n001', - 2496.0, 5120.0, 270.000)
    set u=CreateUnit(p, 'n001', 5248.0, - 2624.0, 270.000)
endfunction
//===========================================================================
function CreatePlayerBuildings takes nothing returns nothing
    call CreateBuildingsForPlayer10()
    call CreateBuildingsForPlayer11()
endfunction
//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
endfunction
//===========================================================================
function CreateAllUnits takes nothing returns nothing
    call CreatePlayerBuildings()
    call CreatePlayerUnits()
endfunction
//***************************************************************************
//*
//*  Regions
//*
//***************************************************************************
function CreateRegions takes nothing returns nothing
    local weathereffect we
    set gg_rct_choose_hero=Rect(- 8192.0, 5408.0, - 5792.0, 8192.0)
    set gg_rct_army_l_1=Rect(- 4960.0, - 4320.0, - 4512.0, - 3840.0)
    set gg_rct_army_m_1=Rect(- 4352.0, - 4320.0, - 3904.0, - 3840.0)
    set gg_rct_army_r_1=Rect(- 4352.0, - 4960.0, - 3904.0, - 4480.0)
    set gg_rct_army_l_2=Rect(- 5248.0, 2944.0, - 4800.0, 3424.0)
    set gg_rct_army_l_3=Rect(- 3456.0, 4736.0, - 3008.0, 5216.0)
    set gg_rct_army_r_2=Rect(3072.0, - 5216.0, 3520.0, - 4736.0)
    set gg_rct_army_r_3=Rect(4704.0, - 3808.0, 5152.0, - 3328.0)
    set gg_rct_army_r_4=Rect(4448.0, 3776.0, 4896.0, 4256.0)
    set gg_rct_army_m_2=Rect(3840.0, 3776.0, 4288.0, 4256.0)
    set gg_rct_army_l_4=Rect(3840.0, 4448.0, 4288.0, 4928.0)
    set gg_rct_player_home_1=Rect(- 5728.0, - 5664.0, - 5216.0, - 5152.0)
    set gg_rct_player_home_2=Rect(5312.0, 5376.0, 5824.0, 5888.0)
    set gg_rct_creepsA1=Rect(- 3744.0, 608.0, - 3328.0, 1056.0)
    set gg_rct_creepsB1=Rect(- 1504.0, - 224.0, - 1152.0, 192.0)
    set gg_rct_creepsC1=Rect(- 3200.0, - 960.0, - 2816.0, - 576.0)
    set gg_rct_creepsD1=Rect(- 704.0, - 3776.0, - 352.0, - 3392.0)
    set gg_rct_creepsE1=Rect(64.0, - 2336.0, 448.0, - 1952.0)
    set gg_rct_creepsF1=Rect(1248.0, - 3776.0, 1664.0, - 3392.0)
    set gg_rct_creepsS=Rect(- 2496.0, 2496.0, - 2144.0, 2816.0)
    set gg_rct_creepsF2=Rect(- 1216.0, 3328.0, - 928.0, 3616.0)
    set gg_rct_creepsE2=Rect(- 128.0, 1984.0, 256.0, 2336.0)
    set gg_rct_creepsD2=Rect(608.0, 3456.0, 832.0, 3712.0)
    set gg_rct_creepsC2=Rect(2976.0, 480.0, 3328.0, 800.0)
    set gg_rct_creepsB2=Rect(1376.0, 96.0, 1696.0, 352.0)
    set gg_rct_creepsA2=Rect(3424.0, - 1344.0, 3744.0, - 1024.0)
    set gg_rct_treasure=Rect(4000.0, - 4256.0, 4224.0, - 4032.0)
    set gg_rct_falls1=Rect(- 4064.0, 3936.0, - 3872.0, 4128.0)
    set gg_rct_falls2=Rect(- 3360.0, 3232.0, - 3200.0, 3424.0)
    set gg_rct_falls3_1=Rect(- 3296.0, 2624.0, - 3136.0, 2816.0)
    set gg_rct_falls4_1=Rect(- 3200.0, 2112.0, - 3040.0, 2272.0)
    set gg_rct_falls5_1=Rect(- 2880.0, 1792.0, - 2752.0, 1920.0)
    set gg_rct_falls6_1=Rect(- 2400.0, 1536.0, - 2240.0, 1664.0)
    set gg_rct_falls7=Rect(- 1504.0, 1472.0, - 1376.0, 1632.0)
    set gg_rct_falls3_2=Rect(- 2752.0, 3264.0, - 2624.0, 3392.0)
    set gg_rct_falls4_2=Rect(- 2208.0, 3232.0, - 2048.0, 3424.0)
    set gg_rct_falls5_2=Rect(- 1664.0, 2816.0, - 1536.0, 3040.0)
    set gg_rct_falls6_2=Rect(- 1536.0, 2208.0, - 1376.0, 2368.0)
    set gg_rct_falls8=Rect(4448.0, - 4512.0, 4512.0, - 4448.0)
    set gg_rct_waves01=Rect(- 3776.0, 3072.0, - 3072.0, 3840.0)
    set gg_rct_waves02=Rect(- 3104.0, 3008.0, - 2176.0, 3712.0)
    set gg_rct_waves03=Rect(- 3520.0, 2080.0, - 2752.0, 3168.0)
    set gg_rct_waves04=Rect(- 1856.0, 2784.0, - 1632.0, 3296.0)
    set gg_rct_waves05=Rect(- 1728.0, 2176.0, - 1248.0, 2848.0)
    set gg_rct_waves06=Rect(- 3328.0, 1920.0, - 2720.0, 2112.0)
    set gg_rct_waves07=Rect(- 2752.0, 1472.0, - 1248.0, 1920.0)
    set gg_rct_waves08=Rect(- 1760.0, 1856.0, - 1216.0, 2208.0)
    set gg_rct_waves09=Rect(- 2240.0, 992.0, - 704.0, 1504.0)
    set gg_rct_waves10=Rect(- 1280.0, 1472.0, - 1056.0, 1920.0)
    set gg_rct_waves11=Rect(- 1728.0, 928.0, - 448.0, 1280.0)
    set gg_rct_waves12=Rect(- 1120.0, 448.0, 0.0, 768.0)
    set gg_rct_waves13=Rect(- 864.0, 128.0, 64.0, 608.0)
    set gg_rct_waves14=Rect(32.0, 160.0, 224.0, 416.0)
    set gg_rct_waves15=Rect(288.0, - 960.0, 1024.0, - 288.0)
    set gg_rct_waves16=Rect(576.0, - 1216.0, 1504.0, - 384.0)
    set gg_rct_waves17=Rect(736.0, - 1440.0, 1760.0, - 896.0)
    set gg_rct_waves18=Rect(1344.0, - 2208.0, 2784.0, - 1568.0)
    set gg_rct_waves19=Rect(1728.0, - 2432.0, 3424.0, - 2176.0)
    set gg_rct_waves20=Rect(2176.0, - 2848.0, 3648.0, - 2432.0)
    set gg_rct_waves21=Rect(2496.0, - 3008.0, 3936.0, - 2816.0)
    set gg_rct_waves22=Rect(2592.0, - 3136.0, 3904.0, - 2976.0)
    set gg_rct_waves23=Rect(2688.0, - 3264.0, 4128.0, - 3104.0)
    set gg_rct_shop_1=Rect(- 5920.0, - 5248.0, - 5888.0, - 5216.0)
    set gg_rct_shop_2=Rect(5792.0, 5984.0, 5856.0, 6048.0)
    set gg_rct_creeps_gate_1=Rect(1024.0, - 2848.0, 1248.0, - 2624.0)
    set gg_rct_creeps_gate_2=Rect(- 3136.0, - 96.0, - 2944.0, 96.0)
    set gg_rct_creeps_gate_3=Rect(- 224.0, 2720.0, 0.0, 2944.0)
    set gg_rct_creeps_gate_4=Rect(3200.0, - 512.0, 3392.0, - 288.0)
    set gg_rct_Vision=Rect(- 4704.0, 4960.0, - 4672.0, 4992.0)
    set gg_rct_waves24=Rect(- 3456.0, 3616.0, - 2848.0, 4000.0)
    set gg_rct_waves25=Rect(- 4032.0, 2752.0, - 3488.0, 3584.0)
    set gg_rct_waves26=Rect(- 2208.0, 2976.0, - 1824.0, 3552.0)
    set gg_rct_waves27=Rect(- 2208.0, 3520.0, - 2080.0, 3648.0)
    set gg_rct_waves28=Rect(- 3136.0, 1728.0, - 2528.0, 2112.0)
    set gg_rct_waves29=Rect(- 2432.0, 1376.0, - 2208.0, 1504.0)
    set gg_rct_waves30=Rect(- 1088.0, 1472.0, - 960.0, 1728.0)
    set gg_rct_waves31=Rect(- 992.0, 1472.0, - 800.0, 1632.0)
    set gg_rct_waves32=Rect(- 1376.0, 736.0, - 320.0, 960.0)
    set gg_rct_waves33=Rect(- 1472.0, 768.0, - 1344.0, 960.0)
    set gg_rct_waves34=Rect(- 704.0, 0.0, 480.0, 192.0)
    set gg_rct_waves35=Rect(32.0, 384.0, 160.0, 512.0)
    set gg_rct_waves36=Rect(192.0, 160.0, 320.0, 352.0)
    set gg_rct_waves37=Rect(288.0, 160.0, 384.0, 256.0)
    set gg_rct_waves38=Rect(- 544.0, - 128.0, 672.0, 32.0)
    set gg_rct_waves39=Rect(- 352.0, - 320.0, 864.0, - 96.0)
    set gg_rct_waves40=Rect(- 224.0, - 544.0, 320.0, - 288.0)
    set gg_rct_waves41=Rect(- 32.0, - 704.0, 320.0, - 512.0)
    set gg_rct_waves42=Rect(1472.0, - 928.0, 1600.0, - 736.0)
    set gg_rct_waves43=Rect(896.0, - 1600.0, 2624.0, - 1376.0)
    set gg_rct_waves44=Rect(1728.0, - 1408.0, 1952.0, - 928.0)
    set gg_rct_waves45=Rect(1920.0, - 1408.0, 2208.0, - 1024.0)
    set gg_rct_waves46=Rect(2176.0, - 1408.0, 2528.0, - 1152.0)
    set gg_rct_waves47=Rect(2752.0, - 2208.0, 2976.0, - 1696.0)
    set gg_rct_waves48=Rect(2944.0, - 2208.0, 3136.0, - 1856.0)
    set gg_rct_waves49=Rect(1952.0, - 2528.0, 2208.0, - 2400.0)
    set gg_rct_waves50=Rect(2880.0, - 3424.0, 3968.0, - 3232.0)
    set gg_rct_waves51=Rect(2976.0, - 3552.0, 3776.0, - 3392.0)
    set gg_rct_waves52=Rect(3040.0, - 3680.0, 3584.0, - 3520.0)
    set gg_rct_waves53=Rect(3040.0, - 3808.0, 3424.0, - 3648.0)
    set gg_rct_waves54=Rect(3008.0, - 3936.0, 3264.0, - 3776.0)
    set gg_rct_waves55=Rect(2976.0, - 4064.0, 3136.0, - 3904.0)
    set gg_rct_waves56=Rect(- 1664.0, 2816.0, - 1312.0, 3136.0)
    set gg_rct_waves57=Rect(- 1664.0, 3104.0, - 1536.0, 3232.0)
    set gg_rct_air_visible_1=Rect(- 8192.0, - 8192.0, - 6432.0, 5440.0)
    set gg_rct_air_visible_2=Rect(- 6464.0, - 8192.0, 8192.0, - 6432.0)
    set gg_rct_air_visible_3=Rect(6592.0, - 6464.0, 8192.0, 8192.0)
    set gg_rct_air_visible_4=Rect(- 5824.0, 6176.0, 6624.0, 8192.0)
    set gg_rct_tower_A_l_1=Rect(- 5376.0, 2496.0, - 5120.0, 2752.0)
    set gg_rct_tower_A_l_2=Rect(- 5184.0, - 320.0, - 4928.0, - 64.0)
    set gg_rct_tower_A_l_3=Rect(- 5120.0, - 2784.0, - 4864.0, - 2528.0)
    set gg_rct_tower_A_m_1=Rect(- 1088.0, - 864.0, - 832.0, - 608.0)
    set gg_rct_tower_A_m_2=Rect(- 2048.0, - 2272.0, - 1792.0, - 2016.0)
    set gg_rct_tower_A_m_3=Rect(- 3392.0, - 3424.0, - 3136.0, - 3168.0)
    set gg_rct_tower_A_r_1=Rect(2560.0, - 5344.0, 2816.0, - 5088.0)
    set gg_rct_tower_A_r_2=Rect(0.0, - 4960.0, 256.0, - 4704.0)
    set gg_rct_tower_A_r_3=Rect(- 2624.0, - 5152.0, - 2368.0, - 4896.0)
    set gg_rct_tower_A_h_1=Rect(- 4608.0, - 4128.0, - 4352.0, - 3872.0)
    set gg_rct_tower_A_h_2=Rect(- 4096.0, - 4640.0, - 3840.0, - 4384.0)
    set gg_rct_tower_A_base=Rect(- 4832.0, - 4800.0, - 4384.0, - 4320.0)
    set gg_rct_tower_B_m_1=Rect(832.0, 544.0, 1088.0, 800.0)
    set gg_rct_tower_B_m_2=Rect(1728.0, 1760.0, 1984.0, 2016.0)
    set gg_rct_tower_B_m_3=Rect(3200.0, 3296.0, 3456.0, 3552.0)
    set gg_rct_tower_B_l_1=Rect(- 2624.0, 4960.0, - 2368.0, 5216.0)
    set gg_rct_tower_B_l_2=Rect(- 64.0, 4704.0, 192.0, 4960.0)
    set gg_rct_tower_B_l_3=Rect(2496.0, 4832.0, 2752.0, 5088.0)
    set gg_rct_tower_B_r_1=Rect(5120.0, - 2784.0, 5376.0, - 2528.0)
    set gg_rct_tower_B_r_2=Rect(4800.0, - 96.0, 5056.0, 160.0)
    set gg_rct_tower_B_r_3=Rect(4864.0, 2528.0, 5120.0, 2784.0)
    set gg_rct_tower_B_h_1=Rect(3840.0, 4320.0, 4096.0, 4576.0)
    set gg_rct_tower_B_h_2=Rect(4288.0, 3872.0, 4544.0, 4128.0)
    set gg_rct_tower_B_base=Rect(4256.0, 4224.0, 4896.0, 4896.0)
endfunction
//***************************************************************************
//*
//*  Custom Script Code
//*
//***************************************************************************
//TESH.scrollpos=0
//TESH.alwaysfold=0
//***************************************************************************
//*
//*  Players
//*
//***************************************************************************
function InitCustomPlayerSlots takes nothing returns nothing
    // Player 0
    call SetPlayerStartLocation(Player(0), 0)
    call ForcePlayerStartLocation(Player(0), 0)
    call SetPlayerColor(Player(0), ConvertPlayerColor(0))
    call SetPlayerRacePreference(Player(0), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(0), false)
    call SetPlayerController(Player(0), MAP_CONTROL_USER)
    // Player 1
    call SetPlayerStartLocation(Player(1), 1)
    call ForcePlayerStartLocation(Player(1), 1)
    call SetPlayerColor(Player(1), ConvertPlayerColor(1))
    call SetPlayerRacePreference(Player(1), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(1), false)
    call SetPlayerController(Player(1), MAP_CONTROL_USER)
    // Player 2
    call SetPlayerStartLocation(Player(2), 2)
    call ForcePlayerStartLocation(Player(2), 2)
    call SetPlayerColor(Player(2), ConvertPlayerColor(2))
    call SetPlayerRacePreference(Player(2), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(2), false)
    call SetPlayerController(Player(2), MAP_CONTROL_USER)
    // Player 3
    call SetPlayerStartLocation(Player(3), 3)
    call ForcePlayerStartLocation(Player(3), 3)
    call SetPlayerColor(Player(3), ConvertPlayerColor(3))
    call SetPlayerRacePreference(Player(3), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(3), false)
    call SetPlayerController(Player(3), MAP_CONTROL_USER)
    // Player 4
    call SetPlayerStartLocation(Player(4), 4)
    call ForcePlayerStartLocation(Player(4), 4)
    call SetPlayerColor(Player(4), ConvertPlayerColor(4))
    call SetPlayerRacePreference(Player(4), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(4), false)
    call SetPlayerController(Player(4), MAP_CONTROL_USER)
    // Player 5
    call SetPlayerStartLocation(Player(5), 5)
    call ForcePlayerStartLocation(Player(5), 5)
    call SetPlayerColor(Player(5), ConvertPlayerColor(5))
    call SetPlayerRacePreference(Player(5), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(5), false)
    call SetPlayerController(Player(5), MAP_CONTROL_USER)
    // Player 6
    call SetPlayerStartLocation(Player(6), 6)
    call ForcePlayerStartLocation(Player(6), 6)
    call SetPlayerColor(Player(6), ConvertPlayerColor(6))
    call SetPlayerRacePreference(Player(6), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(6), false)
    call SetPlayerController(Player(6), MAP_CONTROL_USER)
    // Player 7
    call SetPlayerStartLocation(Player(7), 7)
    call ForcePlayerStartLocation(Player(7), 7)
    call SetPlayerColor(Player(7), ConvertPlayerColor(7))
    call SetPlayerRacePreference(Player(7), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(7), false)
    call SetPlayerController(Player(7), MAP_CONTROL_USER)
    // Player 8
    call SetPlayerStartLocation(Player(8), 8)
    call ForcePlayerStartLocation(Player(8), 8)
    call SetPlayerColor(Player(8), ConvertPlayerColor(8))
    call SetPlayerRacePreference(Player(8), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(8), false)
    call SetPlayerController(Player(8), MAP_CONTROL_USER)
    // Player 9
    call SetPlayerStartLocation(Player(9), 9)
    call ForcePlayerStartLocation(Player(9), 9)
    call SetPlayerColor(Player(9), ConvertPlayerColor(9))
    call SetPlayerRacePreference(Player(9), RACE_PREF_NIGHTELF)
    call SetPlayerRaceSelectable(Player(9), false)
    call SetPlayerController(Player(9), MAP_CONTROL_USER)
endfunction
function InitCustomTeams takes nothing returns nothing
    // Force: 沉沦遗迹
    call SetPlayerTeam(Player(0), 0)
    call SetPlayerTeam(Player(1), 0)
    call SetPlayerTeam(Player(2), 0)
    call SetPlayerTeam(Player(3), 0)
    call SetPlayerTeam(Player(4), 0)
    //   Allied
    call SetPlayerAllianceStateAllyBJ(Player(0), Player(1), true)
    call SetPlayerAllianceStateAllyBJ(Player(0), Player(2), true)
    call SetPlayerAllianceStateAllyBJ(Player(0), Player(3), true)
    call SetPlayerAllianceStateAllyBJ(Player(0), Player(4), true)
    call SetPlayerAllianceStateAllyBJ(Player(1), Player(0), true)
    call SetPlayerAllianceStateAllyBJ(Player(1), Player(2), true)
    call SetPlayerAllianceStateAllyBJ(Player(1), Player(3), true)
    call SetPlayerAllianceStateAllyBJ(Player(1), Player(4), true)
    call SetPlayerAllianceStateAllyBJ(Player(2), Player(0), true)
    call SetPlayerAllianceStateAllyBJ(Player(2), Player(1), true)
    call SetPlayerAllianceStateAllyBJ(Player(2), Player(3), true)
    call SetPlayerAllianceStateAllyBJ(Player(2), Player(4), true)
    call SetPlayerAllianceStateAllyBJ(Player(3), Player(0), true)
    call SetPlayerAllianceStateAllyBJ(Player(3), Player(1), true)
    call SetPlayerAllianceStateAllyBJ(Player(3), Player(2), true)
    call SetPlayerAllianceStateAllyBJ(Player(3), Player(4), true)
    call SetPlayerAllianceStateAllyBJ(Player(4), Player(0), true)
    call SetPlayerAllianceStateAllyBJ(Player(4), Player(1), true)
    call SetPlayerAllianceStateAllyBJ(Player(4), Player(2), true)
    call SetPlayerAllianceStateAllyBJ(Player(4), Player(3), true)
    //   Shared Vision
    call SetPlayerAllianceStateVisionBJ(Player(0), Player(1), true)
    call SetPlayerAllianceStateVisionBJ(Player(0), Player(2), true)
    call SetPlayerAllianceStateVisionBJ(Player(0), Player(3), true)
    call SetPlayerAllianceStateVisionBJ(Player(0), Player(4), true)
    call SetPlayerAllianceStateVisionBJ(Player(1), Player(0), true)
    call SetPlayerAllianceStateVisionBJ(Player(1), Player(2), true)
    call SetPlayerAllianceStateVisionBJ(Player(1), Player(3), true)
    call SetPlayerAllianceStateVisionBJ(Player(1), Player(4), true)
    call SetPlayerAllianceStateVisionBJ(Player(2), Player(0), true)
    call SetPlayerAllianceStateVisionBJ(Player(2), Player(1), true)
    call SetPlayerAllianceStateVisionBJ(Player(2), Player(3), true)
    call SetPlayerAllianceStateVisionBJ(Player(2), Player(4), true)
    call SetPlayerAllianceStateVisionBJ(Player(3), Player(0), true)
    call SetPlayerAllianceStateVisionBJ(Player(3), Player(1), true)
    call SetPlayerAllianceStateVisionBJ(Player(3), Player(2), true)
    call SetPlayerAllianceStateVisionBJ(Player(3), Player(4), true)
    call SetPlayerAllianceStateVisionBJ(Player(4), Player(0), true)
    call SetPlayerAllianceStateVisionBJ(Player(4), Player(1), true)
    call SetPlayerAllianceStateVisionBJ(Player(4), Player(2), true)
    call SetPlayerAllianceStateVisionBJ(Player(4), Player(3), true)
    // Force: 幻想神社
    call SetPlayerTeam(Player(5), 1)
    call SetPlayerTeam(Player(6), 1)
    call SetPlayerTeam(Player(7), 1)
    call SetPlayerTeam(Player(8), 1)
    call SetPlayerTeam(Player(9), 1)
    //   Allied
    call SetPlayerAllianceStateAllyBJ(Player(5), Player(6), true)
    call SetPlayerAllianceStateAllyBJ(Player(5), Player(7), true)
    call SetPlayerAllianceStateAllyBJ(Player(5), Player(8), true)
    call SetPlayerAllianceStateAllyBJ(Player(5), Player(9), true)
    call SetPlayerAllianceStateAllyBJ(Player(6), Player(5), true)
    call SetPlayerAllianceStateAllyBJ(Player(6), Player(7), true)
    call SetPlayerAllianceStateAllyBJ(Player(6), Player(8), true)
    call SetPlayerAllianceStateAllyBJ(Player(6), Player(9), true)
    call SetPlayerAllianceStateAllyBJ(Player(7), Player(5), true)
    call SetPlayerAllianceStateAllyBJ(Player(7), Player(6), true)
    call SetPlayerAllianceStateAllyBJ(Player(7), Player(8), true)
    call SetPlayerAllianceStateAllyBJ(Player(7), Player(9), true)
    call SetPlayerAllianceStateAllyBJ(Player(8), Player(5), true)
    call SetPlayerAllianceStateAllyBJ(Player(8), Player(6), true)
    call SetPlayerAllianceStateAllyBJ(Player(8), Player(7), true)
    call SetPlayerAllianceStateAllyBJ(Player(8), Player(9), true)
    call SetPlayerAllianceStateAllyBJ(Player(9), Player(5), true)
    call SetPlayerAllianceStateAllyBJ(Player(9), Player(6), true)
    call SetPlayerAllianceStateAllyBJ(Player(9), Player(7), true)
    call SetPlayerAllianceStateAllyBJ(Player(9), Player(8), true)
    //   Shared Vision
    call SetPlayerAllianceStateVisionBJ(Player(5), Player(6), true)
    call SetPlayerAllianceStateVisionBJ(Player(5), Player(7), true)
    call SetPlayerAllianceStateVisionBJ(Player(5), Player(8), true)
    call SetPlayerAllianceStateVisionBJ(Player(5), Player(9), true)
    call SetPlayerAllianceStateVisionBJ(Player(6), Player(5), true)
    call SetPlayerAllianceStateVisionBJ(Player(6), Player(7), true)
    call SetPlayerAllianceStateVisionBJ(Player(6), Player(8), true)
    call SetPlayerAllianceStateVisionBJ(Player(6), Player(9), true)
    call SetPlayerAllianceStateVisionBJ(Player(7), Player(5), true)
    call SetPlayerAllianceStateVisionBJ(Player(7), Player(6), true)
    call SetPlayerAllianceStateVisionBJ(Player(7), Player(8), true)
    call SetPlayerAllianceStateVisionBJ(Player(7), Player(9), true)
    call SetPlayerAllianceStateVisionBJ(Player(8), Player(5), true)
    call SetPlayerAllianceStateVisionBJ(Player(8), Player(6), true)
    call SetPlayerAllianceStateVisionBJ(Player(8), Player(7), true)
    call SetPlayerAllianceStateVisionBJ(Player(8), Player(9), true)
    call SetPlayerAllianceStateVisionBJ(Player(9), Player(5), true)
    call SetPlayerAllianceStateVisionBJ(Player(9), Player(6), true)
    call SetPlayerAllianceStateVisionBJ(Player(9), Player(7), true)
    call SetPlayerAllianceStateVisionBJ(Player(9), Player(8), true)
endfunction
function InitAllyPriorities takes nothing returns nothing
    call SetStartLocPrioCount(0, 9)
    call SetStartLocPrio(0, 0, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 1, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 2, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 3, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 4, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 5, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(0, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(1, 9)
    call SetStartLocPrio(1, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 1, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 2, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 3, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 4, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 5, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(1, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(2, 9)
    call SetStartLocPrio(2, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 2, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 3, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 4, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 5, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(2, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(3, 9)
    call SetStartLocPrio(3, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 3, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 4, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 5, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(3, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(4, 9)
    call SetStartLocPrio(4, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 3, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 4, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 5, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(4, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(5, 9)
    call SetStartLocPrio(5, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 3, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 4, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 5, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(5, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(6, 9)
    call SetStartLocPrio(6, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 3, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 4, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 5, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 6, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(6, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(7, 9)
    call SetStartLocPrio(7, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 3, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 4, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 5, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 6, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 7, 8, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(7, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(8, 9)
    call SetStartLocPrio(8, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 3, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 4, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 5, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 6, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 7, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(8, 8, 9, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrioCount(9, 9)
    call SetStartLocPrio(9, 0, 0, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 1, 1, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 2, 2, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 3, 3, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 4, 4, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 5, 5, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 6, 6, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 7, 7, MAP_LOC_PRIO_HIGH)
    call SetStartLocPrio(9, 8, 8, MAP_LOC_PRIO_HIGH)
endfunction
//***************************************************************************
//*
//*  Main Initialization
//*
//***************************************************************************
//===========================================================================
function main takes nothing returns nothing
    call SetCameraBounds(- 8192.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 8192.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 8192.0 - GetCameraMargin(CAMERA_MARGIN_TOP), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 8192.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 8192.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), - 8192.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM))
    call SetDayNightModels("Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl")
    call SetTerrainFogEx(0, 500.0, 5000.0, 0.050, 0.502, 0.502, 0.502)
    call SetWaterBaseColor(0, 0, 255, 255)
    call NewSoundEnvironment("Default")
    call SetAmbientDaySound("FelwoodDay")
    call SetAmbientNightSound("FelwoodNight")
    call SetMapMusic("Music", true, 0)
    call CreateRegions()
    call CreateAllUnits()
    call InitBlizzard()

call ExecuteFunc("Base__Init")

    call InitGlobals()
endfunction
//***************************************************************************
//*
//*  Map Configuration
//*
//***************************************************************************
function config takes nothing returns nothing
    call SetMapName("我的英雄不可能那么萌")
    call SetMapDescription("这里并没有说明")
    call SetPlayers(10)
    call SetTeams(10)
    call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
    call DefineStartLocation(0, 0.0, - 64.0)
    call DefineStartLocation(1, 0.0, - 64.0)
    call DefineStartLocation(2, 0.0, - 64.0)
    call DefineStartLocation(3, 0.0, - 64.0)
    call DefineStartLocation(4, 0.0, - 64.0)
    call DefineStartLocation(5, 0.0, - 64.0)
    call DefineStartLocation(6, 0.0, - 64.0)
    call DefineStartLocation(7, 0.0, - 64.0)
    call DefineStartLocation(8, 0.0, - 64.0)
    call DefineStartLocation(9, 0.0, - 64.0)
    // Player setup
    call InitCustomPlayerSlots()
    call InitCustomTeams()
    call InitAllyPriorities()
endfunction




//Struct method generated initializers/callers:
